<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>background-repeat使用场景</title>
    <style>
        body{
            background-image: url(../img/bg.jpg);
        }
        ul{
            list-style: none;
            width: 505px;
            margin: 100px auto;
        }
        ul li{
            width: 100px;
            float: left;
            line-height: 35px;
            text-align: center;
            border-right: 1px solid #fff;
        }
        ul li a{
            display: block;
            background-image: url(../img/nav_bg.jpg);
            text-decoration: none;
            color: #fff;
        }
        ul li a:hover{
            background-image: url(../img/nav_bg2.jpg);
        }
    </style>
</head>
<body>
    <ul>
        <li><a href="#">首页</a></li>
        <li><a href="#">新闻</a></li>
        <li><a href="#">娱乐</a></li>
        <li><a href="#">科技</a></li>
        <li><a href="#">综合</a></li>
    </ul>
</body>
</html>